#pragma once
#include "Node.h"
#include "..\lib\container\List.h"
#include <vector>

namespace ds {

class GroupNode : public Node {

typedef std::vector<Node*> Nodes;

public:
	GroupNode(const std::string& name) : Node(name,false) {};
	GroupNode(const std::string& name,bool orthogonal = false) : Node(name,orthogonal) {};
	GroupNode(const std::string& name,const std::string& materialName,bool orthogonal = false) : Node(name,materialName,orthogonal) {}
	virtual ~GroupNode();		
	void onCreateDevice();
	void onResetDevice();
	void onLostDevice();
	void onDestroyDevice();
	// basic methods
	void init();
	void loadContent(ResManager& resourceManager);
	void update(float elapsed);
	// rendering
	void prepareRendering();
	void draw();
	void postRendering();
	//
	void addNode(Node* node) {
		m_Nodes.push_back(node);
	}
private:
	Nodes m_Nodes;
};

}

